<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html 
	xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:h="http://java.sun.com/jsf/html" 
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j" 
	xmlns:rich="http://richfaces.org/rich" 
	xmlns:fn="http://java.sun.com/jsp/jstl/functions">


	<rich:panel header="#{msg.schedule_control}" rendered="#{scheduleManageBean.status == 'INIT'}">
		<table>
			<tr>
				
				<td>
					<h:outputText value="#{msg.building_name}" styleClass="outputText" style="font-size: 16px;" />
				</td>
				
				<td>
					<h:selectOneMenu id="search_building_name" styleClass="selectClass" 
						value="#{scheduleManageBean.selectedBuildingId}" valueChangeListener="#{scheduleManageBean.buildingValueChanged}">
	
						<f:selectItems value="#{scheduleManageBean.buildingOptions}" />
						<a4j:ajax event="valueChange" render="search_floor_name,search_room_name,search_machine_name" execute="@this" />
	
					</h:selectOneMenu>
					 
					<h:outputText value="&#160;" /> 
					<h:outputText value="&#160;" /> 
					<h:outputText value="&#160;" />
				</td>
		
				<td>
					<h:outputText value="#{msg.floor_name}" styleClass="outputText" style="font-size: 16px;" />
				</td>
				
				<td>
					<h:selectOneMenu id="search_floor_name" styleClass="selectClass" value="#{scheduleManageBean.selectedFloorId}" valueChangeListener="#{scheduleManageBean.floorValueChanged}">
	
						<f:selectItems value="#{scheduleManageBean.floorOptions}" />
						<a4j:ajax event="valueChange" render="search_room_name,search_machine_name" execute="@this" />
					</h:selectOneMenu>
				</td>
	
			</tr>
	
			<tr>
				<td>
					<h:outputText value="#{msg.room_name}" styleClass="outputText" style="font-size: 16px;" />
				</td>
				
				<td>
					<h:selectOneMenu id="search_room_name" styleClass="selectClass" value="#{scheduleManageBean.selectedRoomId}" valueChangeListener="#{scheduleManageBean.roomValueChanged}">
	
						<f:selectItems value="#{scheduleManageBean.roomOptions}" />
						<a4j:ajax event="valueChange" render="search_machine_name" execute="@this" />
	
					</h:selectOneMenu>
					
					<h:outputText value="&#160;" />
					<h:outputText value="&#160;" />
					<h:outputText value="&#160;" />
				</td>
	
				<td>
					<h:outputText value="#{msg.machine_name}" styleClass="outputText" style="font-size: 16px;" />
				</td>
				
				<td>
					<h:selectOneMenu id="search_machine_name" styleClass="selectClass" value="#{scheduleManageBean.selectedMachineId}">
	
						<f:selectItems value="#{scheduleManageBean.machineOptions}" />
					</h:selectOneMenu>
				</td>
	
			</tr>
	
			<tr>
			
				<td colspan="4" align="right">
					<a4j:commandButton styleClass="buttonClass" style="font-size: 16px;" value="#{msg.search}" 
						action="#{scheduleManageBean.search}" render="@form" />
				</td>
	
			</tr>
		</table>
	</rich:panel>
</html>